package com.atguigu.gmall.common.constant;

/**
 * @Description
 * @Return
 * @Author https://weiranyi.github.io
 * @Date Created in 2022-12-06 18:37
 **/
public class RedisConst {
    public static final String CACHE_SKU_DETAIL_PREFIX = "sku:info:";
    public static final String BITMAP_SKU_NAME = "sku:bitmap";
    public static final String LOCK_SKU_PREFIX = "lock:sku:";

    public static final String CACHE_CATEGORYS = "categorys";

    // 热度
    public static final String CACHE_SKU_HOTSCORE = "sku:score:";

    //用户登录
    public static final String LOGIN_USER = "login:user:";
    public static final long LOGIN_USER_TTL = 7;

    // 购物车-登录（userid）&未登录时（临时id）
    public static final String USER_ID_HEADER = "userid";
    public static final String USER_TEMP_ID_HEADER = "usertempid";

    // 购物车相关
    public static final String CART_INFO_KEY = "cart:info:";
    public static final Long CART_ITEMS_LIMIT = 200L; //总条目限制
    public static final Long CART_ITEM_NUM_LIMIT = 200L; //购物车单向商品限制

    // 订单相关
    public static final String ORDER_TOKEN_NO_REPEAT = "order:token:";
    public static final Long ORDER_TTL = 1000 * 60 * 30L;

    // Mq重试机制数量控制
    public static final String MQ_RETRY_COUNT = "msg:count:";


    // 秒杀商品的key
    public static final String SECKILL_GOODS_CACHE = "seckill:goods:";
    public static final String SECKILL_CODE_TOKEN_CACHE = "seckill:code:";
    public static final String SECKILL_ORDER_CACHE = "seckill:order:";
}
